package com.zc58s.springbootmqtt;

import com.zc58s.springbootmqtt.mqtt.MqttBundle;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @author : fujc-dev@qq.com
 * @created : 2022/9/22 11:29
 */
@Component
public class MQTTApplicationRunner implements ApplicationRunner {


    @Autowired
    MqttBundle clientMQTT;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        clientMQTT.subscribe();
    }
}
